import request from '@/config/axios'

//获取列表
export const getInfoSystemPage = async (params) => {
  return await request.get({
    url: '/amp/info-system/page',
    params
  })
}
//获取树
export const getInfoSystemTree = async (params) => {
  return await request.get({
    url: '/amp/info-system/tree',
    params
  })
}

// 查询系统详情
export const getSystem = async (id: number) => {
  return await request.get({ url: '/amp/info-system/get?id=' + id })
}

// 新增系统
export const createSystem = async (data) => {
  return await request.post({ url: '/amp/info-system/create', data: data })
}

// 修改系统
export const updateSystem = async (params) => {
  return await request.put({ url: '/amp/info-system/update', data: params })
}

// 删除系统
export const deleteSystem = async (id: number) => {
  return await request.delete({ url: '/amp/info-system/delete?id=' + id })
}
// 导出导入
export const infoSystemExportExcel = async (params) => {
  return await request.download({ url: '/amp/info-system/export-excel', params })
}

// 批量新增系统
export const createBatchSystem = async (data) => {
  return await request.postOriginal({ url: '/amp/info-system/createBatch', data: data })
}
